﻿$(function () {
	$(".fullcomment").hide();
	$(".abbrevcomment").show();
	$(".expandcollapse").click(function () {
		var src = ($(this).attr('src') === '/Images/expand.png') ? '/Images/collapse.png' : '/Images/expand.png';
		$(this).attr('src', src);

		$(this).parent().find(".fullcomment").toggle();
		$(this).parent().find(".abbrevcomment").toggle();
	});

	$("#showAllComments").click(function () {
		if (document.getElementById("showAllComments").innerHTML == "Toon alle opmerkingen") {
			document.getElementById("showAllComments").innerHTML = 'Verberg alle opmerkingen';
			$(".fullcomment").show();
			$(".abbrevcomment").hide();
			$(".expandcollapse").attr('src', '/Images/collapse.png');
		}
		else {
			document.getElementById("showAllComments").innerHTML = "Toon alle opmerkingen";
			$(".fullcomment").hide();
			$(".abbrevcomment").show();
			$(".expandcollapse").attr('src', '/Images/expand.png');
		}
	});
});